package com.ruoyi.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.BsJingqu;
import com.ruoyi.system.domain.ro.BsJingquSearchPage;
import com.ruoyi.system.domain.ro.index.CityPeopleNum;
import com.ruoyi.system.domain.ro.index.JingquPeopleNum;
import com.ruoyi.system.domain.ro.index.PeopleNum;
import com.ruoyi.system.domain.ro.index.TimePeopleNum;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.security.core.parameters.P;

import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 * @Entity com.ruoyi.system.domain.BsJingqu
 */
public interface BsJingquMapper extends BaseMapper<BsJingqu> {

    List<BsJingqu> listWithJingDian();

    BsJingqu getJingQuDetails(Long jignquId);

    @Select("update bs_jingqu set order_num=order_num+1 where jingqu_id in (${idsString})")
    void appendOrderNum(@Param("idsString") String idsString);

    List<BsJingqu> listPage(@Param("param") BsJingquSearchPage param);

    PeopleNum selectPeopleCount();

    List<JingquPeopleNum> getJingquPeopleNum(@Param("limit") Integer limit);

    List<CityPeopleNum> getContractIdsWithOrderUse();

    List<TimePeopleNum> getOrderNumForTime(@Param("yesterday") boolean yesterday);

    int getPeopleNumForDay(@Param("date") Date date);
}




